#include "guest.h"

Guest::Guest(QObject *parent) : QObject(parent)
{

}

Guest::Guest(const Guest &info): QObject( nullptr ),
    m_id(info.m_id),
    m_name(info.m_name),
    m_sex(info.m_sex),
    m_age(info.m_age),
    m_phone(info.m_phone),
    m_time(info.m_time)
{

}

Guest::Guest(int id, QString name, QString sex, int age, QString phone, QString time):
    m_id(id),
    m_name(name),
    m_sex(sex),
    m_age(age),
    m_phone(phone),
    m_time(time)
{

}

QStringList Guest::getInfo()
{
    QStringList info;
    info.push_back(QString::number(this->m_id));
    info.push_back(this->m_name);
    info.push_back(this->m_sex);
    info.push_back(QString::number(this->m_age));
    info.push_back(this->m_phone);
    info.push_back(this->m_time);

    return info;
}

Guest Guest::operator=(const Guest &info)
{
    Guest gue(info);
    return gue;
}
